<template>
    <div>
      <h1>温州理工滨海校区</h1>
      <input type="text" v-model="studentId" placeholder="请输入学号">
      <button @click="searchStudent">查找</button>
      <div v-if="studentInfo">
        <h2>学生信息</h2>
        <p>姓名: {{ studentInfo.name }}</p>
        <p>年龄: {{ studentInfo.age }}</p>
      </div>
    </div>
  </template>
  
  <script>
  export default {
    data() {
      return {
        studentId: '',
        studentInfo: null
      };
    },
    methods: {
        searchStudent() {
        this.studentInfo = {
          name: '李小明',
          age: 20,
        };
      }
    }
  };
  </script>
  